<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>embedme: libemb/inc/Socket.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>文件成员</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_574d9269cd334a9d02d8928365303d98.html">libemb</a></li><li class="navelem"><a class="el" href="dir_207aad82934689048a9003fb51f06f7f.html">inc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Socket.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_socket_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This file is part of libemb.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * libemb is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * the Free Software Foundation, either version 3 of the License, or</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * (at your option) any later version.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * libemb is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * GNU General Public License for more details.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * along with libemb.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * Project: Embedme</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * Author : FergusZeng</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * Email  : cblock@126.com</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * git    : https://git.oschina.net/cblock/embedme</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * Copyright 2014 @ ShenZhen ,China</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">*******************************************************************************/</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef __SOCKET_H__</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define __SOCKET_H__</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_base_type_8h.html">BaseType.h</a>&quot;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_i_o_device_8h.html">IODevice.h</a>&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_mutex_8h.html">Mutex.h</a>&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_thread_8h.html">Thread.h</a>&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &lt;pthread.h&gt;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &lt;sys/types.h&gt;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;sys/socket.h&gt;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &lt;netinet/in.h&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="_socket_8h.html#afa49b80ffa7bf3f957f855318e150364">   39</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;{</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    SOCKET_ATTR_CASTTYPE,</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    SOCKET_ATTR_RCVBUF,</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    SOCKET_ATTR_SNDBUF,</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    SOCKET_ATTR_ADDR,</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    SOCKET_ATTR_PORT,</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    SOCKET_ATTR_UNKNOWN=0xFF,</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;}<a class="code" href="_socket_8h.html#afa49b80ffa7bf3f957f855318e150364">SOCKET_ATTR_E</a>;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76">   50</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;{</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76a46117453e68230ac8148bbcc3553e6a7">   52</a></span>&#160;    <a class="code" href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76a46117453e68230ac8148bbcc3553e6a7">SOCKET_BROADCAST</a>,  </div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76a84b904820b28343501f390c549210b79">   53</a></span>&#160;    <a class="code" href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76a84b904820b28343501f390c549210b79">SOCKET_GROUPCAST</a>,  </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76adc41173fc9ae31c5f95d53527b26fb85">   54</a></span>&#160;    <a class="code" href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76adc41173fc9ae31c5f95d53527b26fb85">SOCKET_MULTICAST</a>,  </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;}<a class="code" href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76">SOCKET_CASTTYPE_E</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="_socket_8h.html#a2b300a6e536bd6f94ab8941d02863e7c">   58</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;{</div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="_socket_8h.html#a2b300a6e536bd6f94ab8941d02863e7cac18f5df158384c4a6610e679598d1d77">   60</a></span>&#160;    <a class="code" href="_socket_8h.html#a2b300a6e536bd6f94ab8941d02863e7cac18f5df158384c4a6610e679598d1d77">SOCKET_TYPE_UDP</a>,  </div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="_socket_8h.html#a2b300a6e536bd6f94ab8941d02863e7cad67cd6637f1d77f0d075c0a942b4a16c">   61</a></span>&#160;    <a class="code" href="_socket_8h.html#a2b300a6e536bd6f94ab8941d02863e7cad67cd6637f1d77f0d075c0a942b4a16c">SOCKET_TYPE_TCP</a>,  </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;}<a class="code" href="_socket_8h.html#a2b300a6e536bd6f94ab8941d02863e7c">SOCKET_TYPE_E</a>;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="_socket_8h.html#a75ed4a192272be57647226a203cd8975">   65</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;{</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="_socket_8h.html#a75ed4a192272be57647226a203cd8975a7aa0eb6acdb69c0f32e4f40ca3105278">   67</a></span>&#160;    <a class="code" href="_socket_8h.html#a75ed4a192272be57647226a203cd8975a7aa0eb6acdb69c0f32e4f40ca3105278">TCP_LINK_DISCONNECT</a>,    </div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="_socket_8h.html#a75ed4a192272be57647226a203cd8975a716628d6feb1c67e6aff6822e6257f52">   68</a></span>&#160;    <a class="code" href="_socket_8h.html#a75ed4a192272be57647226a203cd8975a716628d6feb1c67e6aff6822e6257f52">TCP_LINK_CONNECTED</a>,     </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;}<a class="code" href="_socket_8h.html#a75ed4a192272be57647226a203cd8975">TCP_LINK_E</a>;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="class_socket.html">   78</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_socket.html">Socket</a>:<span class="keyword">public</span> <a class="code" href="class_i_o_device.html">IODevice</a>{</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <a class="code" href="class_socket.html">Socket</a>();</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="class_socket.html">Socket</a>();  </div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keyword">virtual</span> sint32 open()=0;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keyword">virtual</span> sint32 <a class="code" href="class_socket.html#ae648df0cc1da2ad17f4bc65d396d2b71">bind</a>(uint16 localPort,std::string localAddr=<span class="stringliteral">&quot;&quot;</span>); </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keyword">virtual</span> sint32 <a class="code" href="class_socket.html#abfbea049b117c0f4c91405b31b4694e4">connectToHost</a>(uint16 peerPort,std::string peerAddr);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    std::string getLocalAddr() {<span class="keywordflow">return</span> m_localAddr;} </div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    std::string getPeerAddr() {<span class="keywordflow">return</span> m_peerAddr;} </div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    sint32 getLocalPort() {<span class="keywordflow">return</span> m_localPort;}</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    sint32 getPeerPort() {<span class="keywordflow">return</span> m_peerPort;}</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_socket.html#aa9e3b0239157c8c1fb5a881b22f6e4cb">isAlive</a>();</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="keyword">public</span>:     <span class="comment">/* 继承自IODevice */</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="class_socket.html#af9a5eeed90596d23629a4d7777696575">   92</a></span>&#160;    <span class="keyword">virtual</span> sint32 <a class="code" href="class_socket.html#af9a5eeed90596d23629a4d7777696575">open</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *device, sint32 ioMode){this-&gt;<a class="code" href="class_socket.html#af9a5eeed90596d23629a4d7777696575">open</a>();}</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keyword">virtual</span> sint32 <a class="code" href="class_socket.html#a1fe4c90416cad39e96049019d178fb37">close</a>();</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keyword">virtual</span> sint32 readData(<span class="keywordtype">char</span> *buf, sint32 count, sint32 timeoutMs=-1)=0;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keyword">virtual</span> sint32 writeData(<span class="keyword">const</span> <span class="keywordtype">char</span> *buf, sint32 count,sint32 timeoutMs=-1)=0;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keyword">virtual</span> sint32 <a class="code" href="class_socket.html#ae40a3069ac1e266adb1c4e9575190d49">setAttribute</a>(sint32 attr, sint32 value);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keyword">virtual</span> sint32 getAttribute(sint32 attr);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    sint32 m_sockfd;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    std::string m_localAddr,m_peerAddr;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    uint16 m_localPort,m_peerPort;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keyword">struct </span>sockaddr_in m_localSockAddr;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;};</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="class_udp_socket.html">  111</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_udp_socket.html">UdpSocket</a>:<span class="keyword">public</span> <a class="code" href="class_socket.html">Socket</a>{</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <a class="code" href="class_udp_socket.html">UdpSocket</a>();</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="class_udp_socket.html">UdpSocket</a>();</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    sint32 <a class="code" href="class_udp_socket.html#adeb843035b3b20bddd617bc654fe3979">open</a>();</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    sint32 <a class="code" href="class_udp_socket.html#a579acf9700828b5e1c030b37475ec7ea">close</a>();</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    sint32 <a class="code" href="class_udp_socket.html#abf2e037e8419d7a0de52f18f61a17515">readData</a>(<span class="keywordtype">char</span>* buf,sint32 len,sint32 timeoutMs=-1);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    sint32 <a class="code" href="class_udp_socket.html#a1514ecb7ac2363283870cf064df83c25">writeData</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* buf,sint32 len, sint32 timeoutMs=-1);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;};</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="class_tcp_socket.html">  127</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_tcp_socket.html">TcpSocket</a>:<span class="keyword">public</span> <a class="code" href="class_socket.html">Socket</a>{</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <a class="code" href="class_tcp_socket.html">TcpSocket</a>();</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="class_tcp_socket.html">TcpSocket</a>();</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    sint32 <a class="code" href="class_tcp_socket.html#a5e0e69092165d6847478a27006b8a8c6">open</a>();</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    sint32 <a class="code" href="class_tcp_socket.html#a58d2fff73fb69eb3f18b00aca7d6c87a">close</a>();</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    sint32 <a class="code" href="class_tcp_socket.html#a35fb1c8b1f5235bce6418a75252c136e">readData</a>(<span class="keywordtype">char</span> *buf, sint32 len,sint32 timeoutMs=-1);         <span class="comment">/* 接收数据 */</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    sint32 <a class="code" href="class_tcp_socket.html#a5f7504d2465e529139750cd36f794822">writeData</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *buf, sint32 len,sint32 timeoutMs=-1);  <span class="comment">/* 发送数据 */</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    sint32 <a class="code" href="class_tcp_socket.html#a5aa820cc351f24dada219b243e832bc0">listenConnection</a>(sint32 maxpend);                            <span class="comment">/* 监听连接 */</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    sint32 <a class="code" href="class_tcp_socket.html#a126ef6e4d23288de68432af73ec46cb1">acceptConnection</a>(<a class="code" href="class_tcp_socket.html">TcpSocket</a>&amp; newSocket);                      <span class="comment">/* 接受连接 */</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    sint32 <a class="code" href="class_tcp_socket.html#a5470902009a68d3fd66c924eb33a6737">connectToHost</a>(uint16 peerPort,std::string peerAddr);         <span class="comment">/* 连接对端 */</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;};</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div>
<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="class_udp_server.html">  145</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_udp_server.html">UdpServer</a>:<span class="keyword">public</span> <a class="code" href="class_runnable_protocol.html">RunnableProtocol</a>{</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    <a class="code" href="class_udp_server.html">UdpServer</a>();</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="class_udp_server.html">UdpServer</a>();</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    sint32 <a class="code" href="class_udp_server.html#adf6dbeb29365bf50fef8066bb28b188a">initServer</a>(uint16 serverPort,std::string serverIP=<span class="stringliteral">&quot;127.0.0.1&quot;</span>,uint32 maxPendings=1);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    sint32 <a class="code" href="class_udp_server.html#a98091976a63665f6c379081f95273a62">startServer</a>();</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    sint32 <a class="code" href="class_udp_server.html#ad18f2533425a859d120516cd839b2c1f">stopServer</a>();</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <a class="code" href="class_socket.html">Socket</a>** <a class="code" href="class_udp_server.html#afacf9b5e5ed67e53ac4d6af1cadebaf7">getServerSocket</a>();</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <a class="code" href="class_socket.html">Socket</a>** <a class="code" href="class_udp_server.html#aef89fbbe4ab487ff45a946ab813c18fa">getClientSocket</a>();</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <span class="keyword">virtual</span> sint32 <a class="code" href="class_udp_server.html#ad6a00822c7b318204d96057e5913309e">recvData</a>(<span class="keywordtype">char</span>* buf, sint32 len);</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keyword">virtual</span> sint32 <a class="code" href="class_udp_server.html#ab4f6ac2151bbbfd421cbe11df2f4d63e">sendData</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* buf, sint32 len);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> serviceLoop()=0;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="keywordtype">void</span> run();</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    <a class="code" href="class_socket.html">Socket</a>* m_serverSocket;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <a class="code" href="class_socket.html">Socket</a>* m_clientSocket;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <a class="code" href="class_thread.html">Thread</a> m_mainThread;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;};</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div>
<div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="class_tcp_server.html">  170</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_tcp_server.html">TcpServer</a>:<span class="keyword">public</span> <a class="code" href="class_udp_server.html">UdpServer</a>{</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <a class="code" href="class_tcp_server.html">TcpServer</a>();</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="class_tcp_server.html">TcpServer</a>();</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="keyword">virtual</span> sint32 <a class="code" href="class_tcp_server.html#a734911e336ac9231c6acbbf2494e6ba8">recvData</a>(<span class="keywordtype">char</span>* buf, sint32 len);</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <span class="keyword">virtual</span> sint32 <a class="code" href="class_tcp_server.html#a3b42dcd08441b83b3474a1647df9211e">sendData</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* buf, sint32 len);</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> serviceLoop()=0;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;};</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="class_socket_html_aa9e3b0239157c8c1fb5a881b22f6e4cb"><div class="ttname"><a href="class_socket.html#aa9e3b0239157c8c1fb5a881b22f6e4cb">Socket::isAlive</a></div><div class="ttdeci">bool isAlive()</div><div class="ttdoc">检查socket是否已打开 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:155</div></div>
<div class="ttc" id="class_tcp_socket_html_a5470902009a68d3fd66c924eb33a6737"><div class="ttname"><a href="class_tcp_socket.html#a5470902009a68d3fd66c924eb33a6737">TcpSocket::connectToHost</a></div><div class="ttdeci">sint32 connectToHost(uint16 peerPort, std::string peerAddr)</div><div class="ttdoc">TCP socket连接远端 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:631</div></div>
<div class="ttc" id="_socket_8h_html_a1b2dfb107e2524548d6ff5676c8d7d76a84b904820b28343501f390c549210b79"><div class="ttname"><a href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76a84b904820b28343501f390c549210b79">SOCKET_GROUPCAST</a></div><div class="ttdef"><b>Definition:</b> Socket.h:53</div></div>
<div class="ttc" id="_socket_8h_html_a75ed4a192272be57647226a203cd8975"><div class="ttname"><a href="_socket_8h.html#a75ed4a192272be57647226a203cd8975">TCP_LINK_E</a></div><div class="ttdeci">TCP_LINK_E</div><div class="ttdef"><b>Definition:</b> Socket.h:65</div></div>
<div class="ttc" id="class_socket_html_abfbea049b117c0f4c91405b31b4694e4"><div class="ttname"><a href="class_socket.html#abfbea049b117c0f4c91405b31b4694e4">Socket::connectToHost</a></div><div class="ttdeci">virtual sint32 connectToHost(uint16 peerPort, std::string peerAddr)</div><div class="ttdoc">检查socket是否已打开 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:141</div></div>
<div class="ttc" id="class_udp_server_html_ad18f2533425a859d120516cd839b2c1f"><div class="ttname"><a href="class_udp_server.html#ad18f2533425a859d120516cd839b2c1f">UdpServer::stopServer</a></div><div class="ttdeci">sint32 stopServer()</div><div class="ttdoc">停止服务器 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:806</div></div>
<div class="ttc" id="_socket_8h_html_a1b2dfb107e2524548d6ff5676c8d7d76adc41173fc9ae31c5f95d53527b26fb85"><div class="ttname"><a href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76adc41173fc9ae31c5f95d53527b26fb85">SOCKET_MULTICAST</a></div><div class="ttdef"><b>Definition:</b> Socket.h:54</div></div>
<div class="ttc" id="class_udp_server_html_ad6a00822c7b318204d96057e5913309e"><div class="ttname"><a href="class_udp_server.html#ad6a00822c7b318204d96057e5913309e">UdpServer::recvData</a></div><div class="ttdeci">virtual sint32 recvData(char *buf, sint32 len)</div><div class="ttdoc">服务器接收数据方法 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:841</div></div>
<div class="ttc" id="class_udp_socket_html_adeb843035b3b20bddd617bc654fe3979"><div class="ttname"><a href="class_udp_socket.html#adeb843035b3b20bddd617bc654fe3979">UdpSocket::open</a></div><div class="ttdeci">sint32 open()</div><div class="ttdoc">打开UDP socket </div><div class="ttdef"><b>Definition:</b> Socket.cpp:266</div></div>
<div class="ttc" id="class_socket_html_ae648df0cc1da2ad17f4bc65d396d2b71"><div class="ttname"><a href="class_socket.html#ae648df0cc1da2ad17f4bc65d396d2b71">Socket::bind</a></div><div class="ttdeci">virtual sint32 bind(uint16 localPort, std::string localAddr=&quot;&quot;)</div><div class="ttdoc">绑定socket到指定IP地址的端口上 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:77</div></div>
<div class="ttc" id="class_udp_socket_html_a1514ecb7ac2363283870cf064df83c25"><div class="ttname"><a href="class_udp_socket.html#a1514ecb7ac2363283870cf064df83c25">UdpSocket::writeData</a></div><div class="ttdeci">sint32 writeData(const char *buf, sint32 len, sint32 timeoutMs=-1)</div><div class="ttdoc">UDP socket发送数据 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:378</div></div>
<div class="ttc" id="class_tcp_socket_html"><div class="ttname"><a href="class_tcp_socket.html">TcpSocket</a></div><div class="ttdoc">TcpSocket类 </div><div class="ttdef"><b>Definition:</b> Socket.h:127</div></div>
<div class="ttc" id="_socket_8h_html_a1b2dfb107e2524548d6ff5676c8d7d76"><div class="ttname"><a href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76">SOCKET_CASTTYPE_E</a></div><div class="ttdeci">SOCKET_CASTTYPE_E</div><div class="ttdef"><b>Definition:</b> Socket.h:50</div></div>
<div class="ttc" id="class_udp_server_html_aef89fbbe4ab487ff45a946ab813c18fa"><div class="ttname"><a href="class_udp_server.html#aef89fbbe4ab487ff45a946ab813c18fa">UdpServer::getClientSocket</a></div><div class="ttdeci">Socket ** getClientSocket()</div><div class="ttdoc">获取客户端Socket </div><div class="ttdef"><b>Definition:</b> Socket.cpp:829</div></div>
<div class="ttc" id="class_udp_socket_html"><div class="ttname"><a href="class_udp_socket.html">UdpSocket</a></div><div class="ttdoc">UdpSocket类 </div><div class="ttdef"><b>Definition:</b> Socket.h:111</div></div>
<div class="ttc" id="class_tcp_socket_html_a35fb1c8b1f5235bce6418a75252c136e"><div class="ttname"><a href="class_tcp_socket.html#a35fb1c8b1f5235bce6418a75252c136e">TcpSocket::readData</a></div><div class="ttdeci">sint32 readData(char *buf, sint32 len, sint32 timeoutMs=-1)</div><div class="ttdoc">TCP socket接收数据 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:498</div></div>
<div class="ttc" id="class_udp_server_html_adf6dbeb29365bf50fef8066bb28b188a"><div class="ttname"><a href="class_udp_server.html#adf6dbeb29365bf50fef8066bb28b188a">UdpServer::initServer</a></div><div class="ttdeci">sint32 initServer(uint16 serverPort, std::string serverIP=&quot;127.0.0.1&quot;, uint32 maxPendings=1)</div><div class="ttdoc">初始化服务器 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:757</div></div>
<div class="ttc" id="class_socket_html_ae40a3069ac1e266adb1c4e9575190d49"><div class="ttname"><a href="class_socket.html#ae40a3069ac1e266adb1c4e9575190d49">Socket::setAttribute</a></div><div class="ttdeci">virtual sint32 setAttribute(sint32 attr, sint32 value)</div><div class="ttdoc">设置socket类型 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:166</div></div>
<div class="ttc" id="class_tcp_server_html_a3b42dcd08441b83b3474a1647df9211e"><div class="ttname"><a href="class_tcp_server.html#a3b42dcd08441b83b3474a1647df9211e">TcpServer::sendData</a></div><div class="ttdeci">virtual sint32 sendData(const char *buf, sint32 len)</div><div class="ttdoc">服务器发送数据方法 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:910</div></div>
<div class="ttc" id="class_tcp_socket_html_a5f7504d2465e529139750cd36f794822"><div class="ttname"><a href="class_tcp_socket.html#a5f7504d2465e529139750cd36f794822">TcpSocket::writeData</a></div><div class="ttdeci">sint32 writeData(const char *buf, sint32 len, sint32 timeoutMs=-1)</div><div class="ttdoc">TCP socket发送数据 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:564</div></div>
<div class="ttc" id="_socket_8h_html_a2b300a6e536bd6f94ab8941d02863e7cac18f5df158384c4a6610e679598d1d77"><div class="ttname"><a href="_socket_8h.html#a2b300a6e536bd6f94ab8941d02863e7cac18f5df158384c4a6610e679598d1d77">SOCKET_TYPE_UDP</a></div><div class="ttdef"><b>Definition:</b> Socket.h:60</div></div>
<div class="ttc" id="class_udp_server_html_ab4f6ac2151bbbfd421cbe11df2f4d63e"><div class="ttname"><a href="class_udp_server.html#ab4f6ac2151bbbfd421cbe11df2f4d63e">UdpServer::sendData</a></div><div class="ttdeci">virtual sint32 sendData(const char *buf, sint32 len)</div><div class="ttdoc">服务器发送数据方法 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:852</div></div>
<div class="ttc" id="class_i_o_device_html"><div class="ttname"><a href="class_i_o_device.html">IODevice</a></div><div class="ttdoc">IO设备抽象类 </div><div class="ttdef"><b>Definition:</b> IODevice.h:49</div></div>
<div class="ttc" id="_i_o_device_8h_html"><div class="ttname"><a href="_i_o_device_8h.html">IODevice.h</a></div></div>
<div class="ttc" id="class_thread_html"><div class="ttname"><a href="class_thread.html">Thread</a></div><div class="ttdoc">线程类 </div><div class="ttdef"><b>Definition:</b> Thread.h:66</div></div>
<div class="ttc" id="class_tcp_socket_html_a126ef6e4d23288de68432af73ec46cb1"><div class="ttname"><a href="class_tcp_socket.html#a126ef6e4d23288de68432af73ec46cb1">TcpSocket::acceptConnection</a></div><div class="ttdeci">sint32 acceptConnection(TcpSocket &amp;newSocket)</div><div class="ttdoc">TCP socket接受连接 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:717</div></div>
<div class="ttc" id="_socket_8h_html_a1b2dfb107e2524548d6ff5676c8d7d76a46117453e68230ac8148bbcc3553e6a7"><div class="ttname"><a href="_socket_8h.html#a1b2dfb107e2524548d6ff5676c8d7d76a46117453e68230ac8148bbcc3553e6a7">SOCKET_BROADCAST</a></div><div class="ttdef"><b>Definition:</b> Socket.h:52</div></div>
<div class="ttc" id="class_socket_html_af9a5eeed90596d23629a4d7777696575"><div class="ttname"><a href="class_socket.html#af9a5eeed90596d23629a4d7777696575">Socket::open</a></div><div class="ttdeci">virtual sint32 open(const char *device, sint32 ioMode)</div><div class="ttdoc">打开设备 </div><div class="ttdef"><b>Definition:</b> Socket.h:92</div></div>
<div class="ttc" id="class_socket_html_a1fe4c90416cad39e96049019d178fb37"><div class="ttname"><a href="class_socket.html#a1fe4c90416cad39e96049019d178fb37">Socket::close</a></div><div class="ttdeci">virtual sint32 close()</div><div class="ttdoc">关闭socket </div><div class="ttdef"><b>Definition:</b> Socket.cpp:61</div></div>
<div class="ttc" id="_socket_8h_html_a2b300a6e536bd6f94ab8941d02863e7c"><div class="ttname"><a href="_socket_8h.html#a2b300a6e536bd6f94ab8941d02863e7c">SOCKET_TYPE_E</a></div><div class="ttdeci">SOCKET_TYPE_E</div><div class="ttdef"><b>Definition:</b> Socket.h:58</div></div>
<div class="ttc" id="class_udp_server_html_afacf9b5e5ed67e53ac4d6af1cadebaf7"><div class="ttname"><a href="class_udp_server.html#afacf9b5e5ed67e53ac4d6af1cadebaf7">UdpServer::getServerSocket</a></div><div class="ttdeci">Socket ** getServerSocket()</div><div class="ttdoc">获取服务端Socket </div><div class="ttdef"><b>Definition:</b> Socket.cpp:818</div></div>
<div class="ttc" id="_thread_8h_html"><div class="ttname"><a href="_thread_8h.html">Thread.h</a></div></div>
<div class="ttc" id="class_udp_server_html"><div class="ttname"><a href="class_udp_server.html">UdpServer</a></div><div class="ttdoc">UdpServer类 </div><div class="ttdef"><b>Definition:</b> Socket.h:145</div></div>
<div class="ttc" id="class_tcp_server_html"><div class="ttname"><a href="class_tcp_server.html">TcpServer</a></div><div class="ttdoc">TcpServer类 </div><div class="ttdef"><b>Definition:</b> Socket.h:170</div></div>
<div class="ttc" id="class_socket_html"><div class="ttname"><a href="class_socket.html">Socket</a></div><div class="ttdoc">Socket抽象基类 </div><div class="ttdef"><b>Definition:</b> Socket.h:78</div></div>
<div class="ttc" id="class_tcp_socket_html_a5e0e69092165d6847478a27006b8a8c6"><div class="ttname"><a href="class_tcp_socket.html#a5e0e69092165d6847478a27006b8a8c6">TcpSocket::open</a></div><div class="ttdeci">sint32 open()</div><div class="ttdoc">打开TCP socket </div><div class="ttdef"><b>Definition:</b> Socket.cpp:466</div></div>
<div class="ttc" id="_mutex_8h_html"><div class="ttname"><a href="_mutex_8h.html">Mutex.h</a></div></div>
<div class="ttc" id="class_runnable_protocol_html"><div class="ttname"><a href="class_runnable_protocol.html">RunnableProtocol</a></div><div class="ttdoc">线程接口 </div><div class="ttdef"><b>Definition:</b> Thread.h:36</div></div>
<div class="ttc" id="class_tcp_server_html_a734911e336ac9231c6acbbf2494e6ba8"><div class="ttname"><a href="class_tcp_server.html#a734911e336ac9231c6acbbf2494e6ba8">TcpServer::recvData</a></div><div class="ttdeci">virtual sint32 recvData(char *buf, sint32 len)</div><div class="ttdoc">服务器接收数据方法 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:898</div></div>
<div class="ttc" id="_socket_8h_html_afa49b80ffa7bf3f957f855318e150364"><div class="ttname"><a href="_socket_8h.html#afa49b80ffa7bf3f957f855318e150364">SOCKET_ATTR_E</a></div><div class="ttdeci">SOCKET_ATTR_E</div><div class="ttdef"><b>Definition:</b> Socket.h:39</div></div>
<div class="ttc" id="_socket_8h_html_a75ed4a192272be57647226a203cd8975a716628d6feb1c67e6aff6822e6257f52"><div class="ttname"><a href="_socket_8h.html#a75ed4a192272be57647226a203cd8975a716628d6feb1c67e6aff6822e6257f52">TCP_LINK_CONNECTED</a></div><div class="ttdef"><b>Definition:</b> Socket.h:68</div></div>
<div class="ttc" id="_socket_8h_html_a2b300a6e536bd6f94ab8941d02863e7cad67cd6637f1d77f0d075c0a942b4a16c"><div class="ttname"><a href="_socket_8h.html#a2b300a6e536bd6f94ab8941d02863e7cad67cd6637f1d77f0d075c0a942b4a16c">SOCKET_TYPE_TCP</a></div><div class="ttdef"><b>Definition:</b> Socket.h:61</div></div>
<div class="ttc" id="class_udp_socket_html_abf2e037e8419d7a0de52f18f61a17515"><div class="ttname"><a href="class_udp_socket.html#abf2e037e8419d7a0de52f18f61a17515">UdpSocket::readData</a></div><div class="ttdeci">sint32 readData(char *buf, sint32 len, sint32 timeoutMs=-1)</div><div class="ttdoc">UDP socket接收数据 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:301</div></div>
<div class="ttc" id="class_udp_socket_html_a579acf9700828b5e1c030b37475ec7ea"><div class="ttname"><a href="class_udp_socket.html#a579acf9700828b5e1c030b37475ec7ea">UdpSocket::close</a></div><div class="ttdeci">sint32 close()</div><div class="ttdoc">关闭UDP socket </div><div class="ttdef"><b>Definition:</b> Socket.cpp:286</div></div>
<div class="ttc" id="class_tcp_socket_html_a58d2fff73fb69eb3f18b00aca7d6c87a"><div class="ttname"><a href="class_tcp_socket.html#a58d2fff73fb69eb3f18b00aca7d6c87a">TcpSocket::close</a></div><div class="ttdeci">sint32 close()</div><div class="ttdoc">关闭TCP socket </div><div class="ttdef"><b>Definition:</b> Socket.cpp:486</div></div>
<div class="ttc" id="_base_type_8h_html"><div class="ttname"><a href="_base_type_8h.html">BaseType.h</a></div></div>
<div class="ttc" id="_socket_8h_html_a75ed4a192272be57647226a203cd8975a7aa0eb6acdb69c0f32e4f40ca3105278"><div class="ttname"><a href="_socket_8h.html#a75ed4a192272be57647226a203cd8975a7aa0eb6acdb69c0f32e4f40ca3105278">TCP_LINK_DISCONNECT</a></div><div class="ttdef"><b>Definition:</b> Socket.h:67</div></div>
<div class="ttc" id="class_tcp_socket_html_a5aa820cc351f24dada219b243e832bc0"><div class="ttname"><a href="class_tcp_socket.html#a5aa820cc351f24dada219b243e832bc0">TcpSocket::listenConnection</a></div><div class="ttdeci">sint32 listenConnection(sint32 maxpend)</div><div class="ttdoc">TCP socket监听连接 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:699</div></div>
<div class="ttc" id="class_udp_server_html_a98091976a63665f6c379081f95273a62"><div class="ttname"><a href="class_udp_server.html#a98091976a63665f6c379081f95273a62">UdpServer::startServer</a></div><div class="ttdeci">sint32 startServer()</div><div class="ttdoc">启动服务器 </div><div class="ttdef"><b>Definition:</b> Socket.cpp:795</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2016年 七月 7日 星期四 19:49:37 , 为 embedme使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
